<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="本网页提供开发相关工具">
    <meta name="keywords" content="NGINX,conf,js,生成,格式化" />
    <title>NGINX配置格式化</title>
    <link rel="shortcut icon" type="image/x-icon" href="../images/nginx.ico" />
    <!-- <link rel="stylesheet" href="https://fonts.lug.ustc.edu.cn/css?family=Raleway:200" /> -->
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Raleway:200" />
    <link rel="stylesheet" href="../css/pure-min.css" />
    <link rel="stylesheet" href="../css/common.css" />

    <script type="text/javascript" src="../js/jquery-3.4.1.min.js"></script>
    <script type="text/javascript" src="../js/layer/layer.js"></script>
    <script type="text/javascript" src="../js/nginxbeautifier.js"></script>
    <script type="module" src="../js/index.js"></script>
    <script type="text/javascript" src="../js/detection.js"></script>

    <style>
        .content-top {
            text-align: center;
        }

        .submit-button {
            /*float: right;*/
            margin-left: 10px;
        }

        #indent-code {
            display: block;
            margin-left: auto;
            margin-right: auto;
        }

        #text-code {
            /*resize: none;*/
            width: 100%;
            max-width: 100%;
            height: 300px;
            max-height: 100%;
        }

        .version {
            border-left: 1px solid #d6d6d6;
            padding-left: 8px;
            margin-left: 5px;
        }
    </style>
</head>

<body>
    <div class="main">
        <div class="header">
            <h1>NGINX配置格式化</h1>
            <h2>支持NGINX的配置格式化</h2>
        </div>
        <div class="content">
            <form class="pure-form pure-form-stacked">
                <div class="pure-u-1 content-top">
                    <input type="radio" value="online" name="beautification"
                        onclick="beautificationClick(this)"><b>在线</b></input>

                    <input type="radio" value="offline" name="beautification" checked="checked"
                        onclick="beautificationClick(this)"><b>离线</b></input>

                    <a class="pure-button pure-button-primary submit-button" onclick="beautifyCode()"
                        onclick="beautificationClick(this)">格式化</a>
                </div>
                <div id="indent-way" class="pure-u-1 content-top">
                    <p><b>缩进值:</b></p>
                    <select class="pure-input-1-5" id="indent-code">
                        <option value="space" selected>空格</option>
                        <option value="tab">Tab</option>
                    </select>
                    <p><b>缩进方式:</b></p>
                    <button id="indentWay1" type='button' class="pure-button" onclick="indentWayButton(this)">Server
                        {<br />&nbsp;
                    </button>
                    <button id="indentWay2" type='button' class="pure-button" onclick="indentWayButton(this)">Server {
                    </button>
                    <button id="indentWay3" type='button' class="pure-button"
                        onclick="indentWayButton(this)">Server<br />{
                    </button>
                </div>
                <legend></legend>
                <div class="pure-u-1">
                    <label for="text-code"><b>配置代码:</b></label>
                    <textarea id="text-code" class="pure-u-1-2 pure-u-md-1-3"></textarea>
                </div>
            </form>
        </div>
        <div class="pure-g footer">
            <div class="pure-u-1-2 legal-license">
                This site is built with using <a href="https://www.purecss.cn" target="_black">Pure</a> v1.0.1
            </div>
            <div class="pure-u-1-2 legal-copyright">
                本网页所有代码版权归 <a href="https://woytu.github.io" target="_black">woytu</a> 所有。
                <span class="version"></span>
            </div>
        </div>
    </div>

    <!-- 统计代码 -->
    <script>
        const _hmt = [];
        (function () {
            const hm = document.createElement("script");
            hm.src = "https://hm.baidu.com/hm.js?7ac7cdb0162597bd65c904b23b4fe505";
            const s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
    </script>
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-130580298-1"></script>
    <script>
        window.dataLayer = window.dataLayer || [];

        function gtag() {
            dataLayer.push(arguments);
        }

        gtag('js', new Date());
        gtag('config', 'UA-130580298-1');
    </script>
</body>

</html>